<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" href="/css/combine.css"/>
    <link rel="stylesheet" href="/css/kube.css">
</head>
<body>
<div id="hero">
    <div id="hero-box">
        <h1>登录</h1>
    </div>
</div>
<div class="wrap content" id="content">
    <form action="" class="form" id="signinForm">
        <label>用户名</label>
        <row>
            <input type="text" name="username">
        </row>
        <label>密码</label>
        <row>
            <input type="password" name="password">
        </row>
        <button class="signin">登录</button>
        <a href="/signup">
            注册
        </a>
    </form>
</div>
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
<script>

    $(".signin").on('click', function (event) {
        event.preventDefault();
        $.post('/signin', $("#signinForm").serialize(), function (res) {
            if (res.status == 1000) {
                window.location.href = '/';
            }
        })
    })
</script>
</body>
</html>